<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>blmc_drivers: /workspace/software/workspace/src/catkin/hardware/blmc_drivers/include/blmc_drivers/devices/motor.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">blmc_drivers
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('motor_8hpp_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">motor.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="motor_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &lt;memory&gt;</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &quot;real_time_tools/timer.hpp&quot;</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#include &quot;real_time_tools/threadsafe/threadsafe_object.hpp&quot;</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#include &quot;real_time_tools/threadsafe/threadsafe_timeseries.hpp&quot;</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="motor__board_8hpp.html">blmc_drivers/devices/motor_board.hpp</a>&quot;</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="device__interface_8hpp.html">blmc_drivers/devices/device_interface.hpp</a>&quot;</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceblmc__drivers.html">blmc_drivers</a></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;{</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;</div><div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="classblmc__drivers_1_1MotorInterface.html">   28</a></span>&#160;<span class="keyword">class </span><a class="code" href="classblmc__drivers_1_1MotorInterface.html">MotorInterface</a>: <span class="keyword">public</span> <a class="code" href="classblmc__drivers_1_1DeviceInterface.html">DeviceInterface</a></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;{</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;</div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="classblmc__drivers_1_1MotorInterface.html#a49b8fc916b9f9debbd7b0988463db5cd">   35</a></span>&#160;    <span class="keyword">typedef</span> real_time_tools::ThreadsafeTimeseries&lt;double&gt; <a class="code" href="classblmc__drivers_1_1MotorInterface.html#a49b8fc916b9f9debbd7b0988463db5cd">ScalarTimeseries</a>;</div><div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="classblmc__drivers_1_1MotorInterface.html#ae31f230b9da3674a05543023c90b124c">   41</a></span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Type&gt; <span class="keyword">using</span> <a class="code" href="classblmc__drivers_1_1MotorInterface.html#ae31f230b9da3674a05543023c90b124c">Ptr</a> = std::shared_ptr&lt;Type&gt;;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;</div><div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="classblmc__drivers_1_1MotorInterface.html#a35c1217dd295078c67bacc2cba08ab33">   47</a></span>&#160;    <span class="keyword">enum</span> <a class="code" href="classblmc__drivers_1_1MotorInterface.html#a35c1217dd295078c67bacc2cba08ab33">MeasurementIndex</a> {current, position, velocity, encoder_index,</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;                           measurement_count};</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div><div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="classblmc__drivers_1_1MotorInterface.html#a1f535a7de62ae8246f44541216254da5">   53</a></span>&#160;    <span class="keyword">virtual</span> <a class="code" href="classblmc__drivers_1_1MotorInterface.html#a1f535a7de62ae8246f44541216254da5">~MotorInterface</a>() {}</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classblmc__drivers_1_1MotorInterface.html#a7ac16ddd18d76781612714a485dcb6bd">send_if_input_changed</a>() = 0;</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="classblmc__drivers_1_1MotorInterface.html#ae31f230b9da3674a05543023c90b124c">Ptr&lt;const ScalarTimeseries&gt;</a> <a class="code" href="classblmc__drivers_1_1MotorInterface.html#a7f6afed670f078518ccb46e1e3b44892">get_measurement</a>(</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;            <span class="keyword">const</span> <span class="keywordtype">int</span>&amp; index = 0) <span class="keyword">const</span> = 0;</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="classblmc__drivers_1_1MotorInterface.html#ae31f230b9da3674a05543023c90b124c">Ptr&lt;const ScalarTimeseries&gt;</a> <a class="code" href="classblmc__drivers_1_1MotorInterface.html#a167ffe5df0412b9abcac9a93861e58d2">get_current_target</a>() <span class="keyword">const</span> = 0;</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="classblmc__drivers_1_1MotorInterface.html#ae31f230b9da3674a05543023c90b124c">Ptr&lt;const ScalarTimeseries&gt;</a> <a class="code" href="classblmc__drivers_1_1MotorInterface.html#a709804e11aa22fbb3107e781c9799bdb">get_sent_current_target</a>() <span class="keyword">const</span> = 0;</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classblmc__drivers_1_1MotorInterface.html#a76b49a1228ad549fa407a54c8da14d13">set_current_target</a>(<span class="keyword">const</span> <span class="keywordtype">double</span>&amp; current_target) = 0;</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classblmc__drivers_1_1MotorInterface.html#a723a772b2be5beb0f07097a5b3e00a89">set_command</a>(<span class="keyword">const</span> <a class="code" href="classblmc__drivers_1_1MotorBoardCommand.html">MotorBoardCommand</a>&amp; command) = 0;</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;};</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;</div><div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="classblmc__drivers_1_1Motor.html">  114</a></span>&#160;<span class="keyword">class </span><a class="code" href="classblmc__drivers_1_1Motor.html">Motor</a>: <span class="keyword">public</span> <a class="code" href="classblmc__drivers_1_1MotorInterface.html">MotorInterface</a></div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;{</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;    <a class="code" href="classblmc__drivers_1_1Motor.html">Motor</a>(Ptr&lt;MotorBoardInterface&gt; board, <span class="keywordtype">bool</span> motor_id);</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;</div><div class="line"><a name="l00129"></a><span class="lineno"><a class="line" href="classblmc__drivers_1_1Motor.html#ad93b64d54b40ff12df7081e009c71239">  129</a></span>&#160;    <span class="keyword">virtual</span> <a class="code" href="classblmc__drivers_1_1Motor.html#ad93b64d54b40ff12df7081e009c71239">~Motor</a>() { }</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;</div><div class="line"><a name="l00135"></a><span class="lineno"><a class="line" href="classblmc__drivers_1_1Motor.html#acf7389e09918c1955986a641efd4f032">  135</a></span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classblmc__drivers_1_1Motor.html#acf7389e09918c1955986a641efd4f032">send_if_input_changed</a>()</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;    {</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;        board_-&gt;send_if_input_changed();</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    }</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    </div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;    <span class="keyword">virtual</span> Ptr&lt;const ScalarTimeseries&gt; <a class="code" href="classblmc__drivers_1_1MotorInterface.html#a7f6afed670f078518ccb46e1e3b44892">get_measurement</a>(<span class="keyword">const</span> <span class="keywordtype">int</span>&amp; index = 0)</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;    <span class="keyword">const</span>;</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;    <span class="keyword">virtual</span> Ptr&lt;const ScalarTimeseries&gt; <a class="code" href="classblmc__drivers_1_1MotorInterface.html#a167ffe5df0412b9abcac9a93861e58d2">get_current_target</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;    <span class="keyword">virtual</span> Ptr&lt;const ScalarTimeseries&gt; <a class="code" href="classblmc__drivers_1_1MotorInterface.html#a709804e11aa22fbb3107e781c9799bdb">get_sent_current_target</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classblmc__drivers_1_1MotorInterface.html#a76b49a1228ad549fa407a54c8da14d13">set_current_target</a>(<span class="keyword">const</span> <span class="keywordtype">double</span>&amp; current_target);</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;</div><div class="line"><a name="l00186"></a><span class="lineno"><a class="line" href="classblmc__drivers_1_1Motor.html#a4af56df5466d011fc2a567dd815a6c1b">  186</a></span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classblmc__drivers_1_1Motor.html#a4af56df5466d011fc2a567dd815a6c1b">set_command</a>(<span class="keyword">const</span> <a class="code" href="classblmc__drivers_1_1MotorBoardCommand.html">MotorBoardCommand</a>&amp; command)</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;    {</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;        board_-&gt;set_command(command);</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;    }</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;<span class="keyword">protected</span>:</div><div class="line"><a name="l00195"></a><span class="lineno"><a class="line" href="classblmc__drivers_1_1Motor.html#a779365c022edb7d4beb4060dcdb7dd72">  195</a></span>&#160;    Ptr&lt;MotorBoardInterface&gt; <a class="code" href="classblmc__drivers_1_1Motor.html#a779365c022edb7d4beb4060dcdb7dd72">board_</a>;</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;</div><div class="line"><a name="l00200"></a><span class="lineno"><a class="line" href="classblmc__drivers_1_1Motor.html#a614903579bd6001169d11b72bc17042b">  200</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classblmc__drivers_1_1Motor.html#a614903579bd6001169d11b72bc17042b">motor_id_</a>;</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;};</div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;</div><div class="line"><a name="l00212"></a><span class="lineno"><a class="line" href="classblmc__drivers_1_1SafeMotor.html">  212</a></span>&#160;<span class="keyword">class </span><a class="code" href="classblmc__drivers_1_1SafeMotor.html">SafeMotor</a>: <span class="keyword">public</span> <a class="code" href="classblmc__drivers_1_1Motor.html">Motor</a></div><div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;{</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;    <a class="code" href="classblmc__drivers_1_1SafeMotor.html">SafeMotor</a>(<a class="code" href="classblmc__drivers_1_1MotorInterface.html#ae31f230b9da3674a05543023c90b124c">Ptr&lt;MotorBoardInterface&gt;</a> board, <span class="keywordtype">bool</span> motor_id,</div><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;              <span class="keyword">const</span> <span class="keywordtype">double</span>&amp; max_current_target = 2.0,</div><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;              <span class="keyword">const</span> <span class="keywordtype">size_t</span>&amp; history_length = 1000,</div><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;              <span class="keyword">const</span> <span class="keywordtype">double</span>&amp; max_velocity = std::numeric_limits&lt;</div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;                    <span class="keywordtype">double</span>&gt;::quiet_NaN());</div><div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;</div><div class="line"><a name="l00238"></a><span class="lineno"><a class="line" href="classblmc__drivers_1_1SafeMotor.html#a2c938b6289e41a7d3ab8a19a045382e0">  238</a></span>&#160;    <span class="keyword">virtual</span> <a class="code" href="classblmc__drivers_1_1MotorInterface.html#ae31f230b9da3674a05543023c90b124c">Ptr&lt;const ScalarTimeseries&gt;</a> <a class="code" href="classblmc__drivers_1_1SafeMotor.html#a2c938b6289e41a7d3ab8a19a045382e0">get_current_target</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;<span class="keyword">    </span>{</div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;        <span class="keywordflow">return</span> current_target_;</div><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;    }</div><div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;</div><div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classblmc__drivers_1_1MotorInterface.html#a76b49a1228ad549fa407a54c8da14d13">set_current_target</a>(<span class="keyword">const</span> <span class="keywordtype">double</span>&amp; current_target);</div><div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;    </div><div class="line"><a name="l00259"></a><span class="lineno"><a class="line" href="classblmc__drivers_1_1SafeMotor.html#ad4f4bb531e2a9e7f965b319afb53d43c">  259</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classblmc__drivers_1_1SafeMotor.html#ad4f4bb531e2a9e7f965b319afb53d43c">set_max_current</a>(<span class="keywordtype">double</span> max_current_target)</div><div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;    {</div><div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;      max_current_target_ = max_current_target;</div><div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;    }</div><div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;</div><div class="line"><a name="l00269"></a><span class="lineno"><a class="line" href="classblmc__drivers_1_1SafeMotor.html#aaa0083a39d815d7b3cd38c680bfea48a">  269</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classblmc__drivers_1_1SafeMotor.html#aaa0083a39d815d7b3cd38c680bfea48a">set_max_velocity</a>(<span class="keywordtype">double</span> max_velocity)</div><div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;    {</div><div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;      max_velocity_ = max_velocity;</div><div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;    }</div><div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;</div><div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;    <span class="keywordtype">double</span> max_current_target_;</div><div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;</div><div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;    <span class="keywordtype">double</span> max_velocity_;</div><div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;</div><div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;    <a class="code" href="classblmc__drivers_1_1MotorInterface.html#ae31f230b9da3674a05543023c90b124c">Ptr&lt;ScalarTimeseries&gt;</a> current_target_;</div><div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;};</div><div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;</div><div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;} <span class="comment">// namespace blmc_drivers</span></div><div class="ttc" id="classblmc__drivers_1_1MotorInterface_html_a723a772b2be5beb0f07097a5b3e00a89"><div class="ttname"><a href="classblmc__drivers_1_1MotorInterface.html#a723a772b2be5beb0f07097a5b3e00a89">blmc_drivers::MotorInterface::set_command</a></div><div class="ttdeci">virtual void set_command(const MotorBoardCommand &amp;command)=0</div><div class="ttdoc">Set the command. </div></div>
<div class="ttc" id="classblmc__drivers_1_1MotorInterface_html_ae31f230b9da3674a05543023c90b124c"><div class="ttname"><a href="classblmc__drivers_1_1MotorInterface.html#ae31f230b9da3674a05543023c90b124c">blmc_drivers::MotorInterface::Ptr</a></div><div class="ttdeci">std::shared_ptr&lt; Type &gt; Ptr</div><div class="ttdoc">This a useful alias for the shared Pointer creation. </div><div class="ttdef"><b>Definition:</b> motor.hpp:41</div></div>
<div class="ttc" id="namespaceblmc__drivers_html"><div class="ttname"><a href="namespaceblmc__drivers.html">blmc_drivers</a></div><div class="ttdoc">This namespace is the standard namespace of the package. </div><div class="ttdef"><b>Definition:</b> analog_sensors.cpp:15</div></div>
<div class="ttc" id="classblmc__drivers_1_1Motor_html"><div class="ttname"><a href="classblmc__drivers_1_1Motor.html">blmc_drivers::Motor</a></div><div class="ttdoc">This class implements the MotorInterface. </div><div class="ttdef"><b>Definition:</b> motor.hpp:114</div></div>
<div class="ttc" id="classblmc__drivers_1_1Motor_html_ad93b64d54b40ff12df7081e009c71239"><div class="ttname"><a href="classblmc__drivers_1_1Motor.html#ad93b64d54b40ff12df7081e009c71239">blmc_drivers::Motor::~Motor</a></div><div class="ttdeci">virtual ~Motor()</div><div class="ttdoc">Destroy the Motor object. </div><div class="ttdef"><b>Definition:</b> motor.hpp:129</div></div>
<div class="ttc" id="classblmc__drivers_1_1MotorBoardCommand_html"><div class="ttname"><a href="classblmc__drivers_1_1MotorBoardCommand.html">blmc_drivers::MotorBoardCommand</a></div><div class="ttdoc">This MotorBoardCommand class is a data structurs that defines a command. </div><div class="ttdef"><b>Definition:</b> motor_board.hpp:31</div></div>
<div class="ttc" id="classblmc__drivers_1_1MotorInterface_html_a167ffe5df0412b9abcac9a93861e58d2"><div class="ttname"><a href="classblmc__drivers_1_1MotorInterface.html#a167ffe5df0412b9abcac9a93861e58d2">blmc_drivers::MotorInterface::get_current_target</a></div><div class="ttdeci">virtual Ptr&lt; const ScalarTimeseries &gt; get_current_target() const =0</div><div class="ttdoc">Get the current target object. </div></div>
<div class="ttc" id="classblmc__drivers_1_1MotorInterface_html_a709804e11aa22fbb3107e781c9799bdb"><div class="ttname"><a href="classblmc__drivers_1_1MotorInterface.html#a709804e11aa22fbb3107e781c9799bdb">blmc_drivers::MotorInterface::get_sent_current_target</a></div><div class="ttdeci">virtual Ptr&lt; const ScalarTimeseries &gt; get_sent_current_target() const =0</div><div class="ttdoc">Get the history of the sent current targets. </div></div>
<div class="ttc" id="classblmc__drivers_1_1MotorInterface_html"><div class="ttname"><a href="classblmc__drivers_1_1MotorInterface.html">blmc_drivers::MotorInterface</a></div><div class="ttdoc">This class declares an interface to the motor. </div><div class="ttdef"><b>Definition:</b> motor.hpp:28</div></div>
<div class="ttc" id="classblmc__drivers_1_1DeviceInterface_html"><div class="ttname"><a href="classblmc__drivers_1_1DeviceInterface.html">blmc_drivers::DeviceInterface</a></div><div class="ttdoc">this class exists purely for logical reasons, it does not in itself implement anything. </div><div class="ttdef"><b>Definition:</b> device_interface.hpp:36</div></div>
<div class="ttc" id="classblmc__drivers_1_1Motor_html_a4af56df5466d011fc2a567dd815a6c1b"><div class="ttname"><a href="classblmc__drivers_1_1Motor.html#a4af56df5466d011fc2a567dd815a6c1b">blmc_drivers::Motor::set_command</a></div><div class="ttdeci">virtual void set_command(const MotorBoardCommand &amp;command)</div><div class="ttdoc">Set the command. </div><div class="ttdef"><b>Definition:</b> motor.hpp:186</div></div>
<div class="ttc" id="classblmc__drivers_1_1MotorInterface_html_a7ac16ddd18d76781612714a485dcb6bd"><div class="ttname"><a href="classblmc__drivers_1_1MotorInterface.html#a7ac16ddd18d76781612714a485dcb6bd">blmc_drivers::MotorInterface::send_if_input_changed</a></div><div class="ttdeci">virtual void send_if_input_changed()=0</div><div class="ttdoc">Actually send the commands and controls. </div></div>
<div class="ttc" id="classblmc__drivers_1_1Motor_html_a779365c022edb7d4beb4060dcdb7dd72"><div class="ttname"><a href="classblmc__drivers_1_1Motor.html#a779365c022edb7d4beb4060dcdb7dd72">blmc_drivers::Motor::board_</a></div><div class="ttdeci">Ptr&lt; MotorBoardInterface &gt; board_</div><div class="ttdoc">The MotorBoard to be used for the communication. </div><div class="ttdef"><b>Definition:</b> motor.hpp:195</div></div>
<div class="ttc" id="classblmc__drivers_1_1SafeMotor_html_a2c938b6289e41a7d3ab8a19a045382e0"><div class="ttname"><a href="classblmc__drivers_1_1SafeMotor.html#a2c938b6289e41a7d3ab8a19a045382e0">blmc_drivers::SafeMotor::get_current_target</a></div><div class="ttdeci">virtual Ptr&lt; const ScalarTimeseries &gt; get_current_target() const </div><div class="ttdoc">Getters. </div><div class="ttdef"><b>Definition:</b> motor.hpp:238</div></div>
<div class="ttc" id="classblmc__drivers_1_1MotorInterface_html_a7f6afed670f078518ccb46e1e3b44892"><div class="ttname"><a href="classblmc__drivers_1_1MotorInterface.html#a7f6afed670f078518ccb46e1e3b44892">blmc_drivers::MotorInterface::get_measurement</a></div><div class="ttdeci">virtual Ptr&lt; const ScalarTimeseries &gt; get_measurement(const int &amp;index=0) const =0</div><div class="ttdoc">Getters. </div></div>
<div class="ttc" id="classblmc__drivers_1_1Motor_html_a614903579bd6001169d11b72bc17042b"><div class="ttname"><a href="classblmc__drivers_1_1Motor.html#a614903579bd6001169d11b72bc17042b">blmc_drivers::Motor::motor_id_</a></div><div class="ttdeci">bool motor_id_</div><div class="ttdoc">The id of the motor on the MotorBoard. </div><div class="ttdef"><b>Definition:</b> motor.hpp:200</div></div>
<div class="ttc" id="classblmc__drivers_1_1MotorInterface_html_a49b8fc916b9f9debbd7b0988463db5cd"><div class="ttname"><a href="classblmc__drivers_1_1MotorInterface.html#a49b8fc916b9f9debbd7b0988463db5cd">blmc_drivers::MotorInterface::ScalarTimeseries</a></div><div class="ttdeci">real_time_tools::ThreadsafeTimeseries&lt; double &gt; ScalarTimeseries</div><div class="ttdoc">This is a useful alias. </div><div class="ttdef"><b>Definition:</b> motor.hpp:35</div></div>
<div class="ttc" id="classblmc__drivers_1_1Motor_html_acf7389e09918c1955986a641efd4f032"><div class="ttname"><a href="classblmc__drivers_1_1Motor.html#acf7389e09918c1955986a641efd4f032">blmc_drivers::Motor::send_if_input_changed</a></div><div class="ttdeci">virtual void send_if_input_changed()</div><div class="ttdoc">Actually send the command and controls via the network, See MotorInterface for more information...</div><div class="ttdef"><b>Definition:</b> motor.hpp:135</div></div>
<div class="ttc" id="classblmc__drivers_1_1SafeMotor_html_ad4f4bb531e2a9e7f965b319afb53d43c"><div class="ttname"><a href="classblmc__drivers_1_1SafeMotor.html#ad4f4bb531e2a9e7f965b319afb53d43c">blmc_drivers::SafeMotor::set_max_current</a></div><div class="ttdeci">void set_max_current(double max_current_target)</div><div class="ttdoc">Set the max_current_target_ object. </div><div class="ttdef"><b>Definition:</b> motor.hpp:259</div></div>
<div class="ttc" id="classblmc__drivers_1_1SafeMotor_html_aaa0083a39d815d7b3cd38c680bfea48a"><div class="ttname"><a href="classblmc__drivers_1_1SafeMotor.html#aaa0083a39d815d7b3cd38c680bfea48a">blmc_drivers::SafeMotor::set_max_velocity</a></div><div class="ttdeci">void set_max_velocity(double max_velocity)</div><div class="ttdoc">Set the max_velocity_ constant. </div><div class="ttdef"><b>Definition:</b> motor.hpp:269</div></div>
<div class="ttc" id="motor__board_8hpp_html"><div class="ttname"><a href="motor__board_8hpp.html">motor_board.hpp</a></div><div class="ttdoc">License BSD-3-Clause </div></div>
<div class="ttc" id="classblmc__drivers_1_1SafeMotor_html"><div class="ttname"><a href="classblmc__drivers_1_1SafeMotor.html">blmc_drivers::SafeMotor</a></div><div class="ttdoc">This class is a safe implementation of the Motor class. </div><div class="ttdef"><b>Definition:</b> motor.hpp:212</div></div>
<div class="ttc" id="classblmc__drivers_1_1MotorInterface_html_a76b49a1228ad549fa407a54c8da14d13"><div class="ttname"><a href="classblmc__drivers_1_1MotorInterface.html#a76b49a1228ad549fa407a54c8da14d13">blmc_drivers::MotorInterface::set_current_target</a></div><div class="ttdeci">virtual void set_current_target(const double &amp;current_target)=0</div><div class="ttdoc">Setters. </div></div>
<div class="ttc" id="device__interface_8hpp_html"><div class="ttname"><a href="device__interface_8hpp.html">device_interface.hpp</a></div><div class="ttdoc">License BSD-3-Clause </div></div>
<div class="ttc" id="classblmc__drivers_1_1MotorInterface_html_a35c1217dd295078c67bacc2cba08ab33"><div class="ttname"><a href="classblmc__drivers_1_1MotorInterface.html#a35c1217dd295078c67bacc2cba08ab33">blmc_drivers::MotorInterface::MeasurementIndex</a></div><div class="ttdeci">MeasurementIndex</div><div class="ttdoc">Here is a list of the different measurement available on the blmc card. </div><div class="ttdef"><b>Definition:</b> motor.hpp:47</div></div>
<div class="ttc" id="classblmc__drivers_1_1MotorInterface_html_a1f535a7de62ae8246f44541216254da5"><div class="ttname"><a href="classblmc__drivers_1_1MotorInterface.html#a1f535a7de62ae8246f44541216254da5">blmc_drivers::MotorInterface::~MotorInterface</a></div><div class="ttdeci">virtual ~MotorInterface()</div><div class="ttdoc">Destroy the MotorInterface object. </div><div class="ttdef"><b>Definition:</b> motor.hpp:53</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_80e6cdd9bbc895bd262b4f65e652822c.html">catkin</a></li><li class="navelem"><a class="el" href="dir_dace45749abc688185d44e8b166728a5.html">hardware</a></li><li class="navelem"><a class="el" href="dir_87d2711f33d814f4f77c208b3c1f3ba9.html">blmc_drivers</a></li><li class="navelem"><a class="el" href="dir_816dc94020a36d1af25b1f5614889f22.html">include</a></li><li class="navelem"><a class="el" href="dir_a56b819f7914f14382554b99ca83f1d8.html">blmc_drivers</a></li><li class="navelem"><a class="el" href="dir_b47d905e4c85065ffdd69d9f780e266d.html">devices</a></li><li class="navelem"><a class="el" href="motor_8hpp.html">motor.hpp</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
